home *** CD-ROM | disk | FTP | other *** search
/ Languguage OS 2 / Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO / gnu / flex_247.zip / flex_247 / MISC / Think-C / Think-C.diffs < prev   
Text File  |  1992-01-28  |  30KB  |  1,284 lines

  1. Common subdirectories: Release-2.3/latest/MISC and Think-C/MISC
  2. Only in Think-C: MakeRes.c
  3. diff -wrc Release-2.3/latest/Makefile Think-C/Makefile
  4. *** Release-2.3/latest/Makefile    Wed Jun 27 21:44:07 1990
  5. --- Think-C/Makefile    Tue Jan 28 02:52:35 1992
  6. ***************
  7. *** 40,50 ****
  8.   # Raw, unformatted troff source will be installed if INSTALLMAN=man, nroff
  9.   # preformatted versions will be installed if INSTALLMAN=cat.
  10.   DESTDIR =
  11. ! BINDIR = /usr/local
  12. ! LIBDIR = /usr/local/lib
  13. ! AUXDIR = /usr/local/lib
  14. ! MANDIR = /usr/man/manl
  15. ! MANEXT = l
  16.   INSTALLMAN = man
  17.   
  18.   # MAKE = make
  19. --- 40,50 ----
  20.   # Raw, unformatted troff source will be installed if INSTALLMAN=man, nroff
  21.   # preformatted versions will be installed if INSTALLMAN=cat.
  22.   DESTDIR =
  23. ! BINDIR = /local/share.sun4.emil/bin
  24. ! LIBDIR = /local/share.sun4.emil/lib/flex
  25. ! AUXDIR = /local/share.sun4.emil/lib/flex
  26. ! MANDIR = /local/share.emil/man/man1
  27. ! MANEXT = 1
  28.   INSTALLMAN = man
  29.   
  30.   # MAKE = make
  31. Only in Think-C: Makefile.ORG
  32. Only in Think-C: Makefile~
  33. Only in Think-C: THINK_C_Projects_etc.hqx
  34. Only in Think-C: THINK_C_notes
  35. diff -wrc Release-2.3/latest/ccl.c Think-C/ccl.c
  36. *** Release-2.3/latest/ccl.c    Wed Jun 27 21:44:07 1990
  37. --- Think-C/ccl.c    Tue Jan 28 02:51:57 1992
  38. ***************
  39. *** 80,86 ****
  40.    *    new_ccl = cclinit();
  41.    */
  42.   
  43. ! int cclinit()
  44.   
  45.       {
  46.       if ( ++lastccl >= current_maxccls )
  47. --- 80,86 ----
  48.    *    new_ccl = cclinit();
  49.    */
  50.   
  51. ! int cclinit(void)
  52.   
  53.       {
  54.       if ( ++lastccl >= current_maxccls )
  55. ***************
  56. *** 165,171 ****
  57.   
  58.           if ( i - 1 > start_char )
  59.           /* this was a run */
  60. !         fprintf( file, "-%s", readable_form( i - 1 ) );
  61.   
  62.           putc( ' ', file );
  63.           }
  64. --- 165,171 ----
  65.   
  66.           if ( i - 1 > start_char )
  67.           /* this was a run */
  68. !         fprintf( file, "-%s", ( i - 1 ) );
  69.   
  70.           putc( ' ', file );
  71.           }
  72. diff -wrc Release-2.3/latest/dfa.c Think-C/dfa.c
  73. *** Release-2.3/latest/dfa.c    Wed Jun 27 21:44:08 1990
  74. --- Think-C/dfa.c    Tue Jan 28 02:52:04 1992
  75. ***************
  76. *** 40,45 ****
  77. --- 40,46 ----
  78.   void dump_transitions PROTO((FILE*, int[]));
  79.   void sympartition PROTO((int[], int, int[], int[]));
  80.   int symfollowset PROTO((int[], int, int, int[]));
  81. + int snstods PROTO((int sns[], int numstates, int accset[], int nacc, int hashval, int *newds_addr));
  82.   
  83.   
  84.   /* check_for_backtracking - check a DFA state for backtracking
  85. ***************
  86. *** 53,59 ****
  87.    * associated with this state
  88.    */
  89.   
  90. ! void check_for_backtracking( ds, state )
  91.   int ds;
  92.   int state[];
  93.   
  94. --- 54,60 ----
  95.    * associated with this state
  96.    */
  97.   
  98. ! static void check_for_backtracking( ds, state )
  99.   int ds;
  100.   int state[];
  101.   
  102. ***************
  103. *** 100,106 ****
  104.    *    accset[1 .. nacc] is the list of accepting numbers for the DFA state.
  105.    */
  106.   
  107. ! void check_trailing_context( nfa_states, num_states, accset, nacc )
  108.   int *nfa_states, num_states;
  109.   int *accset;
  110.   register int nacc;
  111. --- 101,107 ----
  112.    *    accset[1 .. nacc] is the list of accepting numbers for the DFA state.
  113.    */
  114.   
  115. ! static void check_trailing_context( nfa_states, num_states, accset, nacc )
  116.   int *nfa_states, num_states;
  117.   int *accset;
  118.   register int nacc;
  119. ***************
  120. *** 256,262 ****
  121.    *    hashval is the hash value for the dfa corresponding to the state set
  122.    */
  123.   
  124. ! int *epsclosure( t, ns_addr, accset, nacc_addr, hv_addr )
  125.   int *t, *ns_addr, accset[], *nacc_addr, *hv_addr;
  126.   
  127.       {
  128. --- 257,263 ----
  129.    *    hashval is the hash value for the dfa corresponding to the state set
  130.    */
  131.   
  132. ! static int *epsclosure( t, ns_addr, accset, nacc_addr, hv_addr )
  133.   int *t, *ns_addr, accset[], *nacc_addr, *hv_addr;
  134.   
  135.       {
  136. ***************
  137. *** 408,414 ****
  138.    *  dfa starts out in state #1.
  139.    */
  140.   
  141. ! void ntod()
  142.   
  143.       {
  144.       int *accset, ds, nacc, newds;
  145. --- 409,415 ----
  146.    *  dfa starts out in state #1.
  147.    */
  148.   
  149. ! void ntod(void)
  150.   
  151.       {
  152.       int *accset, ds, nacc, newds;
  153. ***************
  154. *** 416,422 ****
  155.       int num_full_table_rows;    /* used only for -f */
  156.       int *nset, *dset;
  157.       int targptr, totaltrans, i, comstate, comfreq, targ;
  158. !     int *epsclosure(), snstods(), symlist[CSIZE + 1];
  159.       int num_start_states;
  160.       int todo_head, todo_next;
  161.   
  162. --- 417,423 ----
  163.       int num_full_table_rows;    /* used only for -f */
  164.       int *nset, *dset;
  165.       int targptr, totaltrans, i, comstate, comfreq, targ;
  166. !     int symlist[CSIZE + 1];
  167.       int num_start_states;
  168.       int todo_head, todo_next;
  169.   
  170. diff -wrc Release-2.3/latest/ecs.c Think-C/ecs.c
  171. *** Release-2.3/latest/ecs.c    Wed Jun 27 21:44:08 1990
  172. --- Think-C/ecs.c    Tue Jan 28 02:52:06 1992
  173. ***************
  174. *** 39,45 ****
  175.    *    ccl2ecl();
  176.    */
  177.   
  178. ! void ccl2ecl()
  179.   
  180.       {
  181.       int i, ich, newlen, cclp, ccls, cclmec;
  182. --- 39,45 ----
  183.    *    ccl2ecl();
  184.    */
  185.   
  186. ! void ccl2ecl(void)
  187.   
  188.       {
  189.       int i, ich, newlen, cclp, ccls, cclmec;
  190. diff -wrc Release-2.3/latest/flex.skel Think-C/flex.skel
  191. *** Release-2.3/latest/flex.skel    Thu Aug 30 12:53:49 1990
  192. --- Think-C/flex.skel    Tue Jan 28 02:52:12 1992
  193. ***************
  194. *** 17,22 ****
  195. --- 17,30 ----
  196.   #endif
  197.   
  198.   
  199. + /* THINK C has ANSI C libraries. */
  200. + #ifdef THINK_C
  201. + #ifndef __STDC__
  202. + #define __STDC__
  203. + #endif
  204. + #endif
  205.   #ifdef __cplusplus
  206.   
  207.   #include <stdlib.h>
  208. ***************
  209. *** 42,47 ****
  210. --- 50,61 ----
  211.   
  212.   #define YY_USE_PROTOS
  213.   #define YY_USE_CONST
  214. + /* THINK C  version 4 cannot handle const declarations. */
  215. + #ifdef THINK_C
  216. + #if THINK_C == 1
  217. + #undef YY_USE_CONST
  218. + #endif
  219. + #endif
  220.   
  221.   #endif    /* __STDC__ */
  222.   #endif    /* ! __cplusplus */
  223. ***************
  224. *** 90,98 ****
  225. --- 104,118 ----
  226.   /* gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
  227.    * is returned in "result".
  228.    */
  229. + #ifdef THINK_C
  230.   #define YY_INPUT(buf,result,max_size) \
  231. +     if ( (result = fread( (char *) buf, 1, max_size, yyin )) < 0 ) \
  232. +         YY_FATAL_ERROR( "fread() in flex scanner failed" );
  233. + #else
  234. + #define YY_INPUT(buf,result,max_size) \
  235.       if ( (result = read( fileno(yyin), (char *) buf, max_size )) < 0 ) \
  236.           YY_FATAL_ERROR( "read() in flex scanner failed" );
  237. + #endif
  238.   #define YY_NULL 0
  239.   
  240.   /* no semi-colon after return; correct usage is to write "yyterminate();" -
  241. diff -wrc Release-2.3/latest/flexdef.h Think-C/flexdef.h
  242. *** Release-2.3/latest/flexdef.h    Thu Aug 30 12:53:50 1990
  243. --- Think-C/flexdef.h    Tue Jan 28 02:52:15 1992
  244. ***************
  245. *** 45,52 ****
  246. --- 45,56 ----
  247.   
  248.   /* size of input alphabet - should be size of ASCII set */
  249.   #ifndef DEFAULT_CSIZE
  250. + #ifdef THINK_C
  251. + #define DEFAULT_CSIZE 256
  252. + #else
  253.   #define DEFAULT_CSIZE 128
  254.   #endif
  255. + #endif
  256.   
  257.   #ifndef PROTO
  258.   #ifdef __STDC__
  259. ***************
  260. *** 56,66 ****
  261. --- 60,80 ----
  262.   #endif
  263.   #endif
  264.   
  265. + #ifndef __STDC__
  266. + #define size_t int
  267. + #endif
  268.   
  269.   #ifdef USG
  270.   #define SYS_V
  271.   #endif
  272.   
  273. + #ifdef THINK_C
  274. + #ifndef __STDC__
  275. + #define __STDC__
  276. + #endif
  277. + #define SYS_V
  278. + #endif
  279.   #ifdef SYS_V
  280.   #include <string.h>
  281.   #else
  282. ***************
  283. *** 333,339 ****
  284. --- 347,362 ----
  285.       int int_val;
  286.       } ;
  287.   
  288. + #ifdef THINK_C
  289. + /* Necessary in THINK C version 4? */
  290. + #if THINK_C == 1
  291. + typedef struct hash_entry **hash_table;
  292. + #else
  293.   typedef struct hash_entry *hash_table[];
  294. + #endif
  295. + #else
  296. + typedef struct hash_entry *hash_table[];
  297. + #endif
  298.   
  299.   #define NAME_TABLE_HASH_SIZE 101
  300.   #define START_COND_HASH_SIZE 101
  301. ***************
  302. *** 621,627 ****
  303.   extern int tmpuses, totnst, peakpairs, numuniq, numdup, hshsave;
  304.   extern int num_backtracking, bol_needed;
  305.   
  306. ! void *allocate_array(), *reallocate_array();
  307.   
  308.   #define allocate_integer_array(size) \
  309.       (int *) allocate_array( size, sizeof( int ) )
  310. --- 644,651 ----
  311.   extern int tmpuses, totnst, peakpairs, numuniq, numdup, hshsave;
  312.   extern int num_backtracking, bol_needed;
  313.   
  314. ! void *allocate_array(int size, size_t element_size),
  315. !      *reallocate_array(void *array, int size, size_t element_size);
  316.   
  317.   #define allocate_integer_array(size) \
  318.       (int *) allocate_array( size, sizeof( int ) )
  319. ***************
  320. *** 668,674 ****
  321.   /* from file ccl.c */
  322.   
  323.   extern void ccladd PROTO((int, int));    /* Add a single character to a ccl */
  324. ! extern int cclinit PROTO(());    /* make an empty ccl */
  325.   extern void cclnegate PROTO((int));    /* negate a ccl */
  326.   
  327.   /* list the members of a set of characters in CCL form */
  328. --- 692,698 ----
  329.   /* from file ccl.c */
  330.   
  331.   extern void ccladd PROTO((int, int));    /* Add a single character to a ccl */
  332. ! extern int cclinit PROTO((void));    /* make an empty ccl */
  333.   extern void cclnegate PROTO((int));    /* negate a ccl */
  334.   
  335.   /* list the members of a set of characters in CCL form */
  336. ***************
  337. *** 678,692 ****
  338.   /* from file dfa.c */
  339.   
  340.   /* increase the maximum number of dfas */
  341. ! extern void increase_max_dfas PROTO(());
  342.   
  343. ! extern void ntod PROTO(());    /* convert a ndfa to a dfa */
  344.   
  345.   
  346.   /* from file ecs.c */
  347.   
  348.   /* convert character classes to set of equivalence classes */
  349. ! extern void ccl2ecl PROTO(());
  350.   
  351.   /* associate equivalence class numbers with class members */
  352.   extern int cre8ecs PROTO((int[], int[], int));
  353. --- 702,716 ----
  354.   /* from file dfa.c */
  355.   
  356.   /* increase the maximum number of dfas */
  357. ! extern void increase_max_dfas PROTO((void));
  358.   
  359. ! extern void ntod PROTO((void));    /* convert a ndfa to a dfa */
  360.   
  361.   
  362.   /* from file ecs.c */
  363.   
  364.   /* convert character classes to set of equivalence classes */
  365. ! extern void ccl2ecl PROTO((void));
  366.   
  367.   /* associate equivalence class numbers with class members */
  368.   extern int cre8ecs PROTO((int[], int[], int));
  369. ***************
  370. *** 703,711 ****
  371.   
  372.   /* from file gen.c */
  373.   
  374. ! extern void make_tables PROTO(());    /* generate transition tables */
  375.   
  376.   
  377.   /* from file main.c */
  378.   
  379.   extern void flexend PROTO((int));
  380. --- 727,743 ----
  381.   
  382.   /* from file gen.c */
  383.   
  384. ! extern void make_tables PROTO((void));    /* generate transition tables */
  385.   
  386.   
  387. + /* from file macutils.c */
  388. + #ifdef THINK_C
  389. + /* load a static table from the current resource file */
  390. + extern short int *load_table (int id);
  391. + #endif
  392.   /* from file main.c */
  393.   
  394.   extern void flexend PROTO((int));
  395. ***************
  396. *** 714,720 ****
  397.   /* from file misc.c */
  398.   
  399.   /* write out the actions from the temporary file to lex.yy.c */
  400. ! extern void action_out PROTO(());
  401.   
  402.   /* true if a string is all lower case */
  403.   extern int all_lower PROTO((register Char *));
  404. --- 746,752 ----
  405.   /* from file misc.c */
  406.   
  407.   /* write out the actions from the temporary file to lex.yy.c */
  408. ! extern void action_out PROTO((void));
  409.   
  410.   /* true if a string is all lower case */
  411.   extern int all_lower PROTO((register Char *));
  412. ***************
  413. *** 725,735 ****
  414.   /* bubble sort an integer array */
  415.   extern void bubble PROTO((int [], int));
  416.   
  417.   /* shell sort a character array */
  418.   extern void cshell PROTO((Char [], int, int));
  419.   
  420. ! extern void dataend PROTO(());    /* finish up a block of data declarations */
  421.   
  422.   /* report an error message and terminate */
  423.   extern void flexerror PROTO((char[]));
  424.   
  425. --- 757,779 ----
  426.   /* bubble sort an integer array */
  427.   extern void bubble PROTO((int [], int));
  428.   
  429. + /* replace upper-case letter to lower-case */
  430. + extern Char clower PROTO((int c));
  431. + /* returns a dynamically allocated copy of a string */
  432. + char *copy_string PROTO((char *str));
  433. + /* returns a dynamically allocated copy of a (potentially) unsigned string */
  434. + extern Char *copy_unsigned_string PROTO((Char *str));
  435.   /* shell sort a character array */
  436.   extern void cshell PROTO((Char [], int, int));
  437.   
  438. ! extern void dataend PROTO((void));    /* finish up a block of data declarations */
  439.   
  440. + /* return character corresponding to escape sequence */
  441. + Char myesc PROTO((Char array[]));
  442.   /* report an error message and terminate */
  443.   extern void flexerror PROTO((char[]));
  444.   
  445. ***************
  446. *** 736,741 ****
  447. --- 780,788 ----
  448.   /* report a fatal error message and terminate */
  449.   extern void flexfatal PROTO((char[]));
  450.   
  451. + /* return current time */
  452. + extern char *flex_gettime PROTO((void));
  453.   /* report an error message formatted with one integer argument */
  454.   extern void lerrif PROTO((char[], int));
  455.   
  456. ***************
  457. *** 753,760 ****
  458.   /* return the integer represented by a string of digits */
  459.   extern int myctoi PROTO((Char []));
  460.   
  461.   /* write out one section of the skeleton file */
  462. ! extern void skelout PROTO(());
  463.   
  464.   /* output a yy_trans_info structure */
  465.   extern void transition_struct_out PROTO((int, int));
  466. --- 800,810 ----
  467.   /* return the integer represented by a string of digits */
  468.   extern int myctoi PROTO((Char []));
  469.   
  470. + /* readable_form - return the the human-readable form of a character */
  471. + extern char *readable_form PROTO((int c));
  472.   /* write out one section of the skeleton file */
  473. ! extern void skelout PROTO((void));
  474.   
  475.   /* output a yy_trans_info structure */
  476.   extern void transition_struct_out PROTO((int, int));
  477. ***************
  478. *** 799,805 ****
  479.   /* create a state with a transition on a given symbol */
  480.   extern int mkstate PROTO((int));
  481.   
  482. ! extern void new_rule PROTO(());    /* initialize for a new rule */
  483.   
  484.   
  485.   /* from file parse.y */
  486. --- 849,855 ----
  487.   /* create a state with a transition on a given symbol */
  488.   extern int mkstate PROTO((int));
  489.   
  490. ! extern void new_rule PROTO((void));    /* initialize for a new rule */
  491.   
  492.   
  493.   /* from file parse.y */
  494. ***************
  495. *** 811,827 ****
  496.   extern void pinpoint_message PROTO((char[]));
  497.   
  498.   extern void synerr PROTO((char []));    /* report a syntax error */
  499. ! extern int yyparse PROTO(());    /* the YACC parser */
  500.   
  501.   
  502.   /* from file scan.l */
  503.   
  504. ! extern int flexscan PROTO(());    /* the Flex-generated scanner for flex */
  505.   
  506.   /* open the given file (if NULL, stdin) for scanning */
  507.   extern void set_input_file PROTO((char*));
  508.   
  509. ! extern int yywrap PROTO(());    /* wrapup a file in the lexical analyzer */
  510.   
  511.   
  512.   /* from file sym.c */
  513. --- 861,877 ----
  514.   extern void pinpoint_message PROTO((char[]));
  515.   
  516.   extern void synerr PROTO((char []));    /* report a syntax error */
  517. ! extern int yyparse PROTO((void));    /* the YACC parser */
  518.   
  519.   
  520.   /* from file scan.l */
  521.   
  522. ! extern int flexscan PROTO((void));    /* the Flex-generated scanner for flex */
  523.   
  524.   /* open the given file (if NULL, stdin) for scanning */
  525.   extern void set_input_file PROTO((char*));
  526.   
  527. ! extern int yywrap PROTO((void));    /* wrapup a file in the lexical analyzer */
  528.   
  529.   
  530.   /* from file sym.c */
  531. ***************
  532. *** 832,837 ****
  533. --- 882,890 ----
  534.   /* lookup the number associated with character class */
  535.   extern int ccllookup PROTO((Char []));
  536.   
  537. + /* lookup a name definition */
  538. + extern Char *ndlookup PROTO((char nd[]));
  539.   extern void ndinstal PROTO((char[], Char[]));    /* install a name definition */
  540.   extern void scinstal PROTO((char[], int));    /* make a start condition */
  541.   
  542. ***************
  543. *** 844,852 ****
  544.   /* build table entries for dfa state */
  545.   extern void bldtbl PROTO((int[], int, int, int, int));
  546.   
  547. ! extern void cmptmps PROTO(());    /* compress template table entries */
  548. ! extern void inittbl PROTO(());    /* initialize transition tables */
  549. ! extern void mkdeftbl PROTO(());    /* make the default, "jam" table entries */
  550.   
  551.   /* create table entries for a state (or state fragment) which has
  552.    * only one out-transition */
  553. --- 897,905 ----
  554.   /* build table entries for dfa state */
  555.   extern void bldtbl PROTO((int[], int, int, int, int));
  556.   
  557. ! extern void cmptmps PROTO((void));    /* compress template table entries */
  558. ! extern void inittbl PROTO((void));    /* initialize transition tables */
  559. ! extern void mkdeftbl PROTO((void));    /* make the default, "jam" table entries */
  560.   
  561.   /* create table entries for a state (or state fragment) which has
  562.    * only one out-transition */
  563. ***************
  564. *** 861,871 ****
  565.   
  566.   /* from file yylex.c */
  567.   
  568. ! extern int yylex PROTO(());
  569.   
  570.   
  571.   /* The Unix kernel calls used here */
  572.   
  573.   extern int read PROTO((int, char*, int));
  574. - extern int unlink PROTO((char*));
  575.   extern int write PROTO((int, char*, int));
  576. --- 914,929 ----
  577.   
  578.   /* from file yylex.c */
  579.   
  580. ! extern int yylex PROTO((void));
  581.   
  582.   
  583.   /* The Unix kernel calls used here */
  584.   
  585.   extern int read PROTO((int, char*, int));
  586.   extern int write PROTO((int, char*, int));
  587. + #ifdef THINK_C
  588. + #define unlink remove
  589. + #else
  590. + extern int unlink PROTO((char*));
  591. + #endif
  592. diff -wrc Release-2.3/latest/gen.c Think-C/gen.c
  593. *** Release-2.3/latest/gen.c    Thu Mar 28 12:04:16 1991
  594. --- Think-C/gen.c    Tue Jan 28 02:52:21 1992
  595. ***************
  596. *** 37,43 ****
  597.   /* declare functions that have forward references */
  598.   
  599.   void gen_next_state PROTO((int));
  600. ! void genecs PROTO(());
  601.   void indent_put2s PROTO((char [], char []));
  602.   void indent_puts PROTO((char []));
  603.   
  604. --- 37,43 ----
  605.   /* declare functions that have forward references */
  606.   
  607.   void gen_next_state PROTO((int));
  608. ! void genecs PROTO((void));
  609.   void indent_put2s PROTO((char [], char []));
  610.   void indent_puts PROTO((char []));
  611.   
  612. ***************
  613. *** 59,65 ****
  614.   
  615.   /* indent to the current level */
  616.   
  617. ! void do_indent()
  618.   
  619.       {
  620.       register int i = indent_level * 4;
  621. --- 59,65 ----
  622.   
  623.   /* indent to the current level */
  624.   
  625. ! static void do_indent(void)
  626.   
  627.       {
  628.       register int i = indent_level * 4;
  629. ***************
  630. *** 80,86 ****
  631.   
  632.   /* generate the code to keep backtracking information */
  633.   
  634. ! void gen_backtracking()
  635.   
  636.       {
  637.       if ( reject || num_backtracking == 0 )
  638. --- 80,86 ----
  639.   
  640.   /* generate the code to keep backtracking information */
  641.   
  642. ! static void gen_backtracking(void)
  643.   
  644.       {
  645.       if ( reject || num_backtracking == 0 )
  646. ***************
  647. *** 102,108 ****
  648.   
  649.   /* generate the code to perform the backtrack */
  650.   
  651. ! void gen_bt_action()
  652.   
  653.       {
  654.       if ( reject || num_backtracking == 0 )
  655. --- 102,108 ----
  656.   
  657.   /* generate the code to perform the backtrack */
  658.   
  659. ! static void gen_bt_action(void )
  660.   
  661.       {
  662.       if ( reject || num_backtracking == 0 )
  663. ***************
  664. *** 136,142 ****
  665.    *     genctbl();
  666.    */
  667.   
  668. ! void genctbl()
  669.   
  670.       {
  671.       register int i;
  672. --- 136,142 ----
  673.    *     genctbl();
  674.    */
  675.   
  676. ! static void genctbl(void)
  677.   
  678.       {
  679.       register int i;
  680. ***************
  681. *** 270,276 ****
  682.   
  683.   /* generate the code to find the action number */
  684.   
  685. ! void gen_find_action()
  686.   
  687.       {
  688.       if ( fullspd )
  689. --- 270,276 ----
  690.   
  691.   /* generate the code to find the action number */
  692.   
  693. ! static void gen_find_action(void)
  694.   
  695.       {
  696.       if ( fullspd )
  697. ***************
  698. *** 391,397 ****
  699.    *     genftbl();
  700.    */
  701.   
  702. ! void genftbl()
  703.   
  704.       {
  705.       register int i;
  706. --- 391,397 ----
  707.    *     genftbl();
  708.    */
  709.   
  710. ! static void genftbl(void)
  711.   
  712.       {
  713.       register int i;
  714. ***************
  715. *** 425,431 ****
  716.   
  717.   /* generate the code to find the next compressed-table state */
  718.   
  719. ! void gen_next_compressed_state( char_map )
  720.   char *char_map;
  721.   
  722.       {
  723. --- 425,431 ----
  724.   
  725.   /* generate the code to find the next compressed-table state */
  726.   
  727. ! static void gen_next_compressed_state( char_map )
  728.   char *char_map;
  729.   
  730.       {
  731. ***************
  732. *** 471,477 ****
  733.   
  734.   /* generate the code to find the next match */
  735.   
  736. ! void gen_next_match()
  737.   
  738.       {
  739.       /* NOTE - changes in here should be reflected in gen_next_state() and
  740. --- 471,477 ----
  741.   
  742.   /* generate the code to find the next match */
  743.   
  744. ! static void gen_next_match(void)
  745.   
  746.       {
  747.       /* NOTE - changes in here should be reflected in gen_next_state() and
  748. ***************
  749. *** 626,632 ****
  750.   
  751.   /* generate the code to make a NUL transition */
  752.   
  753. ! void gen_NUL_trans()
  754.   
  755.       { /* NOTE - changes in here should be reflected in get_next_match() */
  756.       int need_backtracking = (num_backtracking > 0 && ! reject);
  757. --- 626,632 ----
  758.   
  759.   /* generate the code to make a NUL transition */
  760.   
  761. ! static void gen_NUL_trans(void)
  762.   
  763.       { /* NOTE - changes in here should be reflected in get_next_match() */
  764.       int need_backtracking = (num_backtracking > 0 && ! reject);
  765. ***************
  766. *** 702,708 ****
  767.   
  768.   /* generate the code to find the start state */
  769.   
  770. ! void gen_start_state()
  771.   
  772.       {
  773.       if ( fullspd )
  774. --- 702,708 ----
  775.   
  776.   /* generate the code to find the start state */
  777.   
  778. ! static void gen_start_state(void)
  779.   
  780.       {
  781.       if ( fullspd )
  782. ***************
  783. *** 737,743 ****
  784.    *    gentabs();
  785.    */
  786.   
  787. ! void gentabs()
  788.   
  789.       {
  790.       int i, j, k, *accset, nacc, *acc_array, total_states;
  791. --- 737,743 ----
  792.    *    gentabs();
  793.    */
  794.   
  795. ! static void gentabs(void)
  796.   
  797.       {
  798.       int i, j, k, *accset, nacc, *acc_array, total_states;
  799. ***************
  800. *** 1007,1013 ****
  801.    * Generates transition tables and finishes generating output file
  802.    */
  803.   
  804. ! void make_tables()
  805.   
  806.       {
  807.       register int i;
  808. --- 1007,1013 ----
  809.    * Generates transition tables and finishes generating output file
  810.    */
  811.   
  812. ! void make_tables(void)
  813.   
  814.       {
  815.       register int i;
  816. Only in Think-C: macutils.c
  817. diff -wrc Release-2.3/latest/main.c Think-C/main.c
  818. *** Release-2.3/latest/main.c    Wed Jun 27 21:44:29 1990
  819. --- Think-C/main.c    Tue Jan 28 02:52:32 1992
  820. ***************
  821. *** 26,31 ****
  822. --- 26,35 ----
  823.    * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  824.    */
  825.   
  826. + #ifdef THINK_C
  827. + #include <console.h>
  828. + #endif
  829.   #ifndef lint
  830.   char copyright[] =
  831.   "@(#) Copyright (c) 1990 The Regents of the University of California.\n\
  832. ***************
  833. *** 46,53 ****
  834.   /* declare functions that have forward references */
  835.   
  836.   void flexinit PROTO((int, char**));
  837. ! void readin PROTO(());
  838. ! void set_up_initial_allocations PROTO(());
  839.   
  840.   
  841.   /* these globals are all defined and commented in flexdef.h */
  842. --- 50,57 ----
  843.   /* declare functions that have forward references */
  844.   
  845.   void flexinit PROTO((int, char**));
  846. ! void readin PROTO((void));
  847. ! void set_up_initial_allocations PROTO((void));
  848.   
  849.   
  850.   /* these globals are all defined and commented in flexdef.h */
  851. ***************
  852. *** 111,116 ****
  853. --- 115,123 ----
  854.   char **argv;
  855.   
  856.       {
  857. + #ifdef THINK_C
  858. +     argc = ccommand (&argv);
  859. + #endif
  860.       flexinit( argc, argv );
  861.   
  862.       readin();
  863. ***************
  864. *** 190,196 ****
  865.   
  866.       {
  867.       int tblsiz;
  868. -     char *flex_gettime();
  869.   
  870.       if ( skelfile != NULL )
  871.       {
  872. --- 197,202 ----
  873. ***************
  874. *** 394,400 ****
  875.   
  876.       {
  877.       int i, sawcmpflag;
  878. !     char *arg, *flex_gettime(), *mktemp();
  879.   
  880.       printstats = syntaxerror = trace = spprdflt = interactive = caseins = false;
  881.       backtrack_report = performance_report = ddebug = fulltbl = fullspd = false;
  882. --- 400,410 ----
  883.   
  884.       {
  885.       int i, sawcmpflag;
  886. ! #ifdef THINK_C
  887. !     char *arg;
  888. ! #else
  889. !     char *arg, *mktemp();
  890. ! #endif
  891.   
  892.       printstats = syntaxerror = trace = spprdflt = interactive = caseins = false;
  893.       backtrack_report = performance_report = ddebug = fulltbl = fullspd = false;
  894. ***************
  895. *** 609,615 ****
  896. --- 619,629 ----
  897.   #else
  898.       (void) strcpy( temp_action_file_name, "flexXXXXXX.tmp" );
  899.   #endif
  900. + #ifdef THINK_C
  901. +     (void) tmpnam( temp_action_file_name );
  902. + #else
  903.       (void) mktemp( temp_action_file_name );
  904. + #endif
  905.   
  906.       action_file_name = temp_action_file_name;
  907.       }
  908. ***************
  909. *** 666,672 ****
  910.    *    readin();
  911.    */
  912.   
  913. ! void readin()
  914.   
  915.       {
  916.       skelout();
  917. --- 680,686 ----
  918.    *    readin();
  919.    */
  920.   
  921. ! void readin(void)
  922.   
  923.       {
  924.       skelout();
  925. ***************
  926. *** 711,717 ****
  927.   
  928.   /* set_up_initial_allocations - allocate memory for internal tables */
  929.   
  930. ! void set_up_initial_allocations()
  931.   
  932.       {
  933.       current_mns = INITIAL_MNS;
  934. --- 725,731 ----
  935.   
  936.   /* set_up_initial_allocations - allocate memory for internal tables */
  937.   
  938. ! void set_up_initial_allocations(void)
  939.   
  940.       {
  941.       current_mns = INITIAL_MNS;
  942. diff -wrc Release-2.3/latest/misc.c Think-C/misc.c
  943. *** Release-2.3/latest/misc.c    Thu Aug 30 12:53:48 1990
  944. --- Think-C/misc.c    Tue Jan 28 02:53:00 1992
  945. ***************
  946. *** 44,50 ****
  947.   
  948.   /* declare functions that have forward references */
  949.   
  950. ! void dataflush PROTO(());
  951.   int otoi PROTO((Char []));
  952.   
  953.   
  954. --- 44,50 ----
  955.   
  956.   /* declare functions that have forward references */
  957.   
  958. ! void dataflush PROTO((void));
  959.   int otoi PROTO((Char []));
  960.   
  961.   
  962. ***************
  963. *** 56,62 ****
  964.    *     Copies the action file up to %% (or end-of-file) to lex.yy.c
  965.    */
  966.   
  967. ! void action_out()
  968.   
  969.       {
  970.       char buf[MAXLINE];
  971. --- 56,62 ----
  972.    *     Copies the action file up to %% (or end-of-file) to lex.yy.c
  973.    */
  974.   
  975. ! void action_out(void)
  976.   
  977.       {
  978.       char buf[MAXLINE];
  979. ***************
  980. *** 72,78 ****
  981.   /* allocate_array - allocate memory for an integer array of the given size */
  982.   
  983.   void *allocate_array( size, element_size )
  984. ! int size, element_size;
  985.   
  986.       {
  987.       register void *mem;
  988. --- 72,79 ----
  989.   /* allocate_array - allocate memory for an integer array of the given size */
  990.   
  991.   void *allocate_array( size, element_size )
  992. ! int size;
  993. ! size_t element_size;
  994.   
  995.       {
  996.       register void *mem;
  997. ***************
  998. *** 325,331 ****
  999.    *    dataflush();
  1000.    */
  1001.   
  1002. ! void dataflush()
  1003.   
  1004.       {
  1005.       putchar( '\n' );
  1006. --- 326,332 ----
  1007.    *    dataflush();
  1008.    */
  1009.   
  1010. ! static void dataflush(void)
  1011.   
  1012.       {
  1013.       putchar( '\n' );
  1014. ***************
  1015. *** 390,395 ****
  1016. --- 391,400 ----
  1017.   
  1018.   /* include sys/types.h to use time_t and make lint happy */
  1019.   
  1020. + #ifdef THINK_C
  1021. + #include <ctype.h>
  1022. + #include <time.h>
  1023. + #else
  1024.   #ifndef MS_DOS
  1025.   #ifndef VMS
  1026.   #include <sys/types.h>
  1027. ***************
  1028. *** 397,402 ****
  1029. --- 402,408 ----
  1030.   #include <types.h>
  1031.   #endif
  1032.   #endif
  1033. + #endif
  1034.   
  1035.   #ifdef MS_DOS
  1036.   #include <time.h>
  1037. ***************
  1038. *** 409,415 ****
  1039. --- 415,425 ----
  1040.       time_t t, time();
  1041.       char *result, *ctime(), *copy_string();
  1042.   
  1043. + #ifdef THINK_C
  1044. +     t = time( (time_t *) 0 );
  1045. + #else
  1046.       t = time( (long *) 0 );
  1047. + #endif
  1048.   
  1049.       result = copy_string( ctime( &t ) );
  1050.   
  1051. ***************
  1052. *** 465,471 ****
  1053.    *    val = htoi( str );
  1054.    */
  1055.   
  1056. ! int htoi( str )
  1057.   Char str[];
  1058.   
  1059.       {
  1060. --- 475,481 ----
  1061.    *    val = htoi( str );
  1062.    */
  1063.   
  1064. ! static int htoi( str )
  1065.   Char str[];
  1066.   
  1067.       {
  1068. ***************
  1069. *** 486,492 ****
  1070.    *    val = is_hex_digit( ch );
  1071.    */
  1072.   
  1073. ! int is_hex_digit( ch )
  1074.   int ch;
  1075.   
  1076.       {
  1077. --- 496,502 ----
  1078.    *    val = is_hex_digit( ch );
  1079.    */
  1080.   
  1081. ! static int is_hex_digit( ch )
  1082.   int ch;
  1083.   
  1084.       {
  1085. ***************
  1086. *** 755,761 ****
  1087.   
  1088.   void *reallocate_array( array, size, element_size )
  1089.   void *array;
  1090. ! int size, element_size;
  1091.   
  1092.       {
  1093.       register void *new_array;
  1094. --- 765,772 ----
  1095.   
  1096.   void *reallocate_array( array, size, element_size )
  1097.   void *array;
  1098. ! int size;
  1099. ! size_t element_size;
  1100.   
  1101.       {
  1102.       register void *new_array;
  1103. Only in Think-C: parse.c
  1104. Only in Think-C: parse.h
  1105. diff -wrc Release-2.3/latest/parse.y Think-C/parse.y
  1106. *** Release-2.3/latest/parse.y    Wed Jun 27 21:44:40 1990
  1107. --- Think-C/parse.y    Tue Jan 28 02:53:13 1992
  1108. ***************
  1109. *** 631,637 ****
  1110.    *                    conditions
  1111.    */
  1112.   
  1113. ! void build_eof_action()
  1114.   
  1115.       {
  1116.       register int i;
  1117. --- 631,637 ----
  1118.    *                    conditions
  1119.    */
  1120.   
  1121. ! static void build_eof_action(void)
  1122.   
  1123.       {
  1124.       register int i;
  1125. ***************
  1126. *** 695,701 ****
  1127.    *         currently, messages are ignore
  1128.    */
  1129.   
  1130. ! void yyerror( msg )
  1131.   char msg[];
  1132.   
  1133.       {
  1134. --- 695,701 ----
  1135.    *         currently, messages are ignore
  1136.    */
  1137.   
  1138. ! static void yyerror( msg )
  1139.   char msg[];
  1140.   
  1141.       {
  1142. Only in Think-C: scan.c
  1143. diff -wrc Release-2.3/latest/scan.l Think-C/scan.l
  1144. *** Release-2.3/latest/scan.l    Wed Jun 27 21:44:41 1990
  1145. --- Think-C/scan.l    Tue Jan 28 02:53:22 1992
  1146. ***************
  1147. *** 340,346 ****
  1148.   
  1149.   <SECT2>"{"{NAME}"}"    {
  1150.               register Char *nmdefptr;
  1151. !             Char *ndlookup();
  1152.   
  1153.               (void) strcpy( nmstr, (char *) yytext );
  1154.               nmstr[yyleng - 1] = '\0';  /* chop trailing brace */
  1155. --- 340,346 ----
  1156.   
  1157.   <SECT2>"{"{NAME}"}"    {
  1158.               register Char *nmdefptr;
  1159. !             extern Char *ndlookup();
  1160.   
  1161.               (void) strcpy( nmstr, (char *) yytext );
  1162.               nmstr[yyleng - 1] = '\0';  /* chop trailing brace */
  1163. diff -wrc Release-2.3/latest/sym.c Think-C/sym.c
  1164. *** Release-2.3/latest/sym.c    Wed Jun 27 21:44:41 1990
  1165. --- Think-C/sym.c    Tue Jan 28 02:53:25 1992
  1166. ***************
  1167. *** 32,37 ****
  1168. --- 32,43 ----
  1169.   #endif
  1170.   
  1171.   #include "flexdef.h"
  1172. + #ifdef THINK_C
  1173. + /* For THINK C version 4? */
  1174. + #if THINK_C == 1
  1175. + #include <stdlib.h>
  1176. + #endif
  1177. + #endif
  1178.   
  1179.   
  1180.   /* declare functions that have forward references */
  1181. ***************
  1182. *** 43,49 ****
  1183.   struct hash_entry *sctbl[START_COND_HASH_SIZE];
  1184.   struct hash_entry *ccltab[CCL_HASH_SIZE];
  1185.   
  1186. ! struct hash_entry *findsym();
  1187.   
  1188.   
  1189.   /* addsym - add symbol and definitions to symbol table
  1190. --- 49,55 ----
  1191.   struct hash_entry *sctbl[START_COND_HASH_SIZE];
  1192.   struct hash_entry *ccltab[CCL_HASH_SIZE];
  1193.   
  1194. ! struct hash_entry *findsym PROTO((char sym[], hash_table table, int table_size));
  1195.   
  1196.   
  1197.   /* addsym - add symbol and definitions to symbol table
  1198. ***************
  1199. *** 58,64 ****
  1200.    * -1 is returned if the symbol already exists, and the change not made.
  1201.    */
  1202.   
  1203. ! int addsym( sym, str_def, int_def, table, table_size )
  1204.   register char sym[];
  1205.   char *str_def;
  1206.   int int_def;
  1207. --- 64,70 ----
  1208.    * -1 is returned if the symbol already exists, and the change not made.
  1209.    */
  1210.   
  1211. ! static int addsym( sym, str_def, int_def, table, table_size )
  1212.   register char sym[];
  1213.   char *str_def;
  1214.   int int_def;
  1215. ***************
  1216. *** 234,240 ****
  1217.    *    def/NULL = ndlookup( nd );
  1218.    */
  1219.   
  1220. ! Char *ndlookup( nd )
  1221.   char nd[];
  1222.   
  1223.       {
  1224. --- 240,246 ----
  1225.    *    def/NULL = ndlookup( nd );
  1226.    */
  1227.   
  1228. ! extern Char *ndlookup( nd )
  1229.   char nd[];
  1230.   
  1231.       {
  1232. diff -wrc Release-2.3/latest/tblcmp.c Think-C/tblcmp.c
  1233. *** Release-2.3/latest/tblcmp.c    Wed Jun 27 21:44:41 1990
  1234. --- Think-C/tblcmp.c    Tue Jan 28 02:53:27 1992
  1235. ***************
  1236. *** 296,302 ****
  1237.   
  1238.   /* expand_nxt_chk - expand the next check arrays */
  1239.   
  1240. ! void expand_nxt_chk()
  1241.   
  1242.       {
  1243.       register int old_max = current_max_xpairs;
  1244. --- 296,302 ----
  1245.   
  1246.   /* expand_nxt_chk - expand the next check arrays */
  1247.   
  1248. ! static void expand_nxt_chk()
  1249.   
  1250.       {
  1251.       register int old_max = current_max_xpairs;
  1252. ***************
  1253. *** 332,338 ****
  1254.    * and an action number will be added in [-1].
  1255.    */
  1256.   
  1257. ! int find_table_space( state, numtrans )
  1258.   int *state, numtrans;
  1259.       
  1260.       {
  1261. --- 332,338 ----
  1262.    * and an action number will be added in [-1].
  1263.    */
  1264.   
  1265. ! static int find_table_space( state, numtrans )
  1266.   int *state, numtrans;
  1267.       
  1268.       {
  1269.